Skip to content

get po-tag#1895

Merged
98llm merged 1 commit intorelease/v2.6.0rc20from
hotfix/remove_filters
Apr 2, 2026
Merged

get po-tag#1895
98llm merged 1 commit intorelease/v2.6.0rc20from
hotfix/remove_filters

Conversation

@98llm
Copy link
Copy Markdown
Collaborator

@98llm 98llm commented Apr 2, 2026

Description

Adds support for removing previously applied filters in the THF Browse component before applying new ones. Introduces a reusable po-tag DOM utility and extends the language pack with the new "Remove Filters" key across all supported languages.


Changes

tir/technologies/core/language.py

  • Added remove_filters attribute to LanguagePack class.
  • Mapped the key to localized strings for all supported languages:
    • English: "Remove filters"
    • Portuguese: "Remover filtros"
    • Spanish: "Eliminar filtros"
    • Russian: "Удалить фильтры"
  • Also added missing Filters and Apply Filters entries for the Russian language pack.

tir/technologies/poui_internal.py

  • _filter_thf_browse: Now calls _remove_filters_from_browse() before opening the filter panel, ensuring stale filters are cleared prior to applying new ones. Updated docstring to reflect that filters must be a list of dicts.
  • _remove_filters_from_browse (new): Checks for a po-tag element inside kendo-grid matching the "Remove Filters" label and clicks it when found, then waits for the component to finish loading.
  • _get_po_tag (new): Generic DOM helper that locates a po-tag element within a given CSS-selector container by matching its inner span text (case-insensitive). Returns the element or None.

Motivation

When _filter_thf_browse was called multiple times, previously applied filters remained active, causing incorrect or cumulative filter results. This fix ensures a clean state before each filter application.


Testing

  • Verify that filters are correctly removed before new filters are applied in THF Browse.
  • Validate that _get_po_tag returns the correct element when a matching po-tag exists.
  • Validate that _get_po_tag returns None when no matching element is found.
  • Confirm all language strings render correctly for EN, PT, ES, and RU locales.
  • Ensure no regression in existing filter-related tests.

Related Issues / Tickets

@98llm 98llm merged commit 38ca288 into release/v2.6.0rc20 Apr 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant